<template>
  <el-icon :class="svgClass" :style="style">
    <component :is="iconClass" />
  </el-icon>
</template>

<script>
export default {
  name: 'SvgIcon',
  props: {
    iconClass: {
      type: String,
      required: true
    },
    className: {
      type: String,
      default: ''
    },
    style: {
      type: Object
    }
  },
  computed: {
    svgClass() {
      if (this.className) {
        return this.className
      }
    }
  }
}
</script>

<style lang="scss" scoped></style>
